namespace go camera_method

/*设备接入方式*/
enum DeviceConnectType
{
    RTSP = 0,
    SDK,
    ISUP,
}


enum Method{
    ConnectDevice =  1001   //视频调用
    PlayHistory             //视频历史调阅
    StopPlay                //视频停止推流
    PTZControl              //摄像头云台控制
    PTZPresetControl        //摄像头预置点
    PTZPresetList           //摄像头预置点列表
    GetDeviceSetupHelpInfo
    DeviceLogin
    DeviceLogout
    CleanStreamWithNoneVisitor
    SetHeartBeatCallback
    DeviceInfoQuery
    DeviceStatusInfoQuery
    SubscribeEvent
    NotifyEvent
    AlarmSubscribe
    AlarmEventNotifyAndDispatcher
    AlterModifyDeviceInfo
    HistoryDraggingRatioPlay
    HistoryPlayScale
    HistoryFileList
    GuardControlDevice
}


/*云台预置点操作类型*/
enum PTZPRESETCMD
{
    PRESET_SET = 0, //设置预置点
    PRESET_CLEAR,   //清除预置点
    PRESET_GOTO     //转到预置点
}

struct PlayRequest {
    1:string DeviceID //摄像头id
    2:string StreamID //视频流
    3:string UserCity //城市
    4:string AppID //客户端appID
    5:string ClientID //客户端ID
    6:i64 StartTime //开始时间(历史回看)
    7:i64 EndTime //结束时间(历史回看)
    8:i64 ChannelID //通道号
    9:double DraggingRatio //拖动比例(历史回看)
    10:i64  OffsetTime //拖动时间
    11:string ScaleType //倍速
    12:string DeviceCity
}



struct PlayResponse {
    1:string ParentDeviceID
    2:i32 ParentChannlID //信道
    3:string MediaID
	4:i64 StreamType //流类型
	5: string MediaServerHost
    6: string SSRCStr //视频流
    7: i32 HttpPort
    8: string App
    9:string RtmpPlayUrl
    10:string WsFlvPlayUrl
    11:string DeviceID
    12:string DeviceCity
}



/*云台控制*/
struct PTZControl{
    1:string DeviceID //设备ID
    2:i32 Channl //信道
    3:string ClientID //客户端ID
    4:string AppID //客户端appID
    5:i32 ptzCmd,    /*云台控制命令*/
    6:i32 speed;        /*PTZ 速度，值越大，代表速度越快*/
    7:i32 startStop,    /*控制启停命令 0_开始动作 1_停止动作*/
    8:string EventID //事务id
}

/*云台预置点操作*/
struct PTZPresetControl{
    1:i64 presetCmd,     /*预置命令*/
    2:i32 presetIndex,            /*预置点序号*/
    3:string EventID //事务id
    4:string AppID //客户端appID
    5:string ClientID //客户端ID
    6:string DeviceID //设备ID
    7:i32 Channl //信道
    8: string presetName /*预置点名称*/
}

struct PTZPresetList {
1:  string deviceSipID,              /*设备ID*/
2:  i32 channelID,                   /*通道号*/
3:  i64 videoStreamMode,             /*接入方式*/
4:  i64 presetCmd,          /*预置命令*/
5:  i32 presetIndex,                 /*预置点序号*/
6:  string tid,                      /*事务ID*/
7:  i64 ipcType,                      /*设备IPC类型: 0_nvr 1_ipc 2_无*/
8:  bool isDirectConnect,            /*是否直连*/
9:  string parentSipID,              /*父级设备ID*/
10: i32 parentChannelID,             /*父级设备通道号*/
11: string Name   //预置点名称
}


//通用控制回复
struct ControlResponse{
    1:string ClientID
    2:string DeviceID
    3:string Result
    4:string EventID
    5:string AppID
}

//设备布防
struct ModifyParam {
 1: string deviceSipID,              //设备ID
    2: i32 videoStreamMode, //视频推流方式 1_RTSP 2_SDK 3_ISUP(EHOME)
    3: i32 ipcType,                 //设备IPC类型
    4: bool isDirectConnect,            //是否直连 1_直连 0_间接连接
    5: i32 channelID,                   //设备通道号
    6: i32 parentChannel,               //父级通道号
    7: string parentSipID,              //父级设备ID
    8: string protocVersion,            //协议版本
    9: string connectSolutionID,        //接入方案ID
    10: string deviceName,              //设备名称
    11: bool isCancel                   //是否布防
}